/**
 * Created by LC on 2019/11/21
 */
package com.hw.paltfrom.controller.mainscreen;

import com.hw.paltfrom.service.mainscreen.WeightingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * 称重检测
 */
@RestController
@RequestMapping("weight")
public class WeightingController {
    @Autowired
    private WeightingService service;

    /**
     *  5分钟以内的动态检测总数,未超限检测总数
     * @return
     */
    @RequestMapping("testingNum")
    public Map<String,Object> getTestingNum(){
        return service.getTestingNum();
    }

    /**
     *  一小时内每5分钟以内的动态检测总数,未超限检测总数
     * @return
     */
    @RequestMapping("onehour")
    public List<Map<String, Object>> getTestingNumIn5m(){
        return service.getTestingNumIn5m();
    }
}
